<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8">
        <title>Title</title>
        <script>
            function doAlert(){
                var flag=window.alert("你点我干嘛");
                console.log(flag);
            }
            function doConfirm(){
                var flag=window.confirm("您是否确定关闭");
                console.log(flag);
            }
            function doPrompt(){
                var username=window.prompt("请输入您的姓名:");
                console.log(username);
            }

        </script>
    </head>
    <body>
        <input type="button" value="警告框" onclick="doAlert()">
        <input type="button" value="确认框" onclick="doConfirm()">
        <input type="button" value="输入框" onclick="doPrompt()">
    </body>
</html>